<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // let a = [1,2,3];
    // a.toString = a.shift;
    let i = 0;
    Object.defineProperty(window, 'a', {
      get() {
        return ++i;
      }
     })
    if(a == 1 && a == 2 && a == 3) {
      console.log('test')
    }
  </script>
</body>
</html>